result = int(input("请输入一个数字:"))
lst = [2, 3, 4, 5, 9, 8, 7, 6]
for i, j in enumerate(lst):
    num = int(result) - j
    print(i, j, num, lst[i+1:])
    if num in lst[i+1:]:
        v = lst[i+1:].index(num)+i+1
        print(f'相加的两个数为{lst[i]}, {lst[v]}')
        print(f'两个数字的下标为{i},{v}')
        break
    else:
        print("没有找到两数相加为输入")
